//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;

namespace CommunityServer.Components
{
	public class CSEventArgs : EventArgs
	{
		private ObjectState _state;
		private ApplicationType _appType;

		public ObjectState State
		{
			get{ return _state;}
		}

		public ApplicationType ApplicationType
		{
			get{return _appType;}
		}

		public CSEventArgs(ObjectState state, ApplicationType appType)
		{
			_state = state;
			_appType = appType;
		}

		public CSEventArgs():this(ObjectState.None,ApplicationType.Unknown){}

	}

    public class CSPostEventArgs : CSEventArgs
    {
        private TextPartSet _textparts = null;
        private PostTarget _target = PostTarget.Unknown;

        public TextPartSet TextParts
        {
            get { return _textparts;}
        }

        public PostTarget Target
        {
            get { return _target;}
        }

        public CSPostEventArgs(ObjectState state, ApplicationType appType, string formattedText):this(state,appType,formattedText,PostTarget.Unknown)
        {
        }

        public CSPostEventArgs(ObjectState state, ApplicationType appType, string formattedText, PostTarget target):base(state,appType)
        {
            _textparts = TextPartManager.Parse(formattedText);
            _target = target;
        }
    }

	public class CSAcceptUserInvitationEventArgs : CSEventArgs
	{
		private User _userAccepted = null;

		public User UserAccepted
		{
			get { return _userAccepted; }
		}

		public CSAcceptUserInvitationEventArgs(ObjectState state, ApplicationType appType, User userAccepted) : base(state, appType)
		{
			_userAccepted = userAccepted;
		}
	}

    public enum PostTarget
    {
        Unknown = 0,
        Web =1,
        Syndication =2,
        Offline=3,
        Other=4,
        Print=5,
		Nntp=6,
		Email=7,
		MailGateway=8
    }
}